<?php
/* @var $this TrMDokterJdwController */
/* @var $model TrMDokterJdw */
/* @var $form CActiveForm */

//$this->widget('application.extensions.CRegisterScript', array('functionName' => 'registerJqueryTimePicker'));

?>

<div class="form">

    <?php $form=$this->beginWidget('CActiveForm', array(
        'id'=>'tr-mdokter-jdw-form',
        'enableAjaxValidation'=>false,
    )); ?>

    <p class="note">Fields <span class="required">*</span> Wajib Diisi.</p>

    <?php
    
    echo 'Poli : ';
                                //alert(profileJSON.type);
    echo $form->dropDownList($post, 'id', CHtml::listData(TrMAction::model()->findAll(array('condition'=>"t.parent_id = 8",'order'=>'t.sort ASC')), 'id', 'name'), 
        array('options' => array('empty'=>'Select',)));
	echo "<br>";
    echo CHtml::dropDownList('ddlHari',1, array(1=>"Senin","Selasa","Rabu","Kamis","Jumat", "Sabtu","Minggu"));
    //echo CHtml::hiddenField('HdnIdLayanan',$post->trMDokterJdws[0]->layanan_id);
    
    echo CHtml::hiddenField('HdnIdDokter',@$_GET['id']);
    /*
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $this->widget('CJuiDateTimePicker',array(
        'model'=>'', //Model object
        'attribute'=>'eventDate', //attribute name
        'mode'=>'datetime', //use "time","date" or "datetime" (default)
        'options'=>array() // jquery plugin options
    )); */

    // echo CHtml::textField('abv', 'b', array('class' => 'inline timepicker','id' => 2));

    // echo '<input id="96-time-2601" class="inline timepicker hasDatepicker" type="text" name="Waktu Pemeriksaan" value="00:00">';


    echo ' Jam : ';
    $this->widget(
        'ext.jui.EJuiDateTimePicker',
        array(
            'name'=>'timeStart',
            //'language'=> 'ru',//default Yii::app()->language
            'mode'    => 'time',//'datetime' or 'time' ('datetime' default)
            'options'   => array(
                'hourGrid'=> 5,
                'minuteGrid'=> 10,
                //'dateFormat' => 'dd.mm.yy',
                //'timeFormat' => '',//'hh:mm tt' default
            ),
        )
    );
    echo ' ~ ';
    $this->widget(
        'ext.jui.EJuiDateTimePicker',
        array(
            'name'=>'timeEnd',
            //'language'=> 'ru',//default Yii::app()->language
            'mode'    => 'time',//'datetime' or 'time' ('datetime' default)
            'options'   => array(
                'hourGrid'=> 5,
                'minuteGrid'=> 10,
                //'dateFormat' => 'dd.mm.yy',
                //'timeFormat' => '',//'hh:mm tt' default
            ),
        )
    );

    //<input id="96-time-2601" class="inline timepicker hasDatepicker" type="text" name="Waktu Pemeriksaan" value="" onblur="submitValue(this.value,"Waktu Pemeriksaan",2601,"time");">
    /*
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'name'=>'MutationOrder[date_mutation]',
            'options'=>array(
                'showAnim'=>'bounce',
                'dateFormat'=>'DD',
                'hourGrid' => 4,
                'hourMin' => 9,
                'hourMax' => 17,
                'timeFormat' => 'h:m',
                'changeMonth' => true,
                'changeYear' => false,
                'numberOfMonths'=>2,
                'showButtonPanel'=>true,
            ),
            'htmlOptions'=>array(
                'style'=>'height:20px;'
            ),
        ));
     */

    echo '<div class="form-actions">';
    $options = array(
		'success' => "js:function(data, textStatus, XMLHttpRequest) {
			location.reload();
		}",
		'error' => 'js:function(XMLHttpRequest, textStatus, errorThrown) { alert("Error Data"); }'
	);
    echo CHtml::ajaxSubmitButton('Simpan',  CHtml::normalizeUrl(array('TrMDokterJdw/create')),$options,array('class' => 'btn btn-primary')
	);
   
    echo '</div>';


    ?>

    <?php $this->endWidget(); ?>

<!-- form -->

